<!DOCTYPE HTML>
<html>
<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@page import="com.beidouapp.security.utils.DscpCommUtils" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link href="<%=request.getContextPath()%>/css/common/H-ui.min.css" rel="stylesheet" type="text/css"/>
    <link href="<%=request.getContextPath()%>/css/common/H-ui.admin.css" rel="stylesheet" type="text/css"/>
    <link href="<%=request.getContextPath()%>/css/iconfont/iconfont.css" rel="stylesheet" type="text/css"/>
    <link href="<%=request.getContextPath()%>/css/font-awesome/font-awesome.min.css" rel="stylesheet" type="text/css"/>
    <link href="<%=request.getContextPath()%>/css/common/style.css" rel="stylesheet" type="text/css"/>
    <link href="<%=request.getContextPath()%>/css/common/jquery-ui.min.css" rel="stylesheet" type="text/css"/>
    <link href="<%=request.getContextPath()%>/css/common/autocomplete.css" rel="stylesheet" type="text/css"/>
    <title>用户新增</title>
</head>
<body>
<div class="pd-20">
    <form action="<%=request.getContextPath()%>/api/employee/add" method="post" class="form form-horizontal"
          id="form-add">
        <div class="row cl">
            <label class="form-label col-2"><span class="c-red">*</span>用户名</label>
            <div class="formControls col-3">
                <input type="text" class="input-text" value="" placeholder=""
                       id="loginname" name="loginname" datatype="code" nullmsg="用户名不能为空！">
            </div>
            <label class="form-label col-3"><span class="c-red">*</span>员工姓名</label>
            <div class="formControls col-3">
                <input type="text" class="input-text" value="" placeholder=""
                       id="empName" name="empName" datatype="*1-16" nullmsg="员工姓名不能为空！">
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-2"><span class="c-red">*</span>员工编号</label>
            <div class="formControls col-3">
                <input type="text" class="input-text" value="" placeholder=""
                       id="code" name="code" datatype="*1-16" nullmsg="员工编号不能为空！">
            </div>
            <label class="form-label col-3">婚姻状态</label>
            <div class="formControls col-3 ui-widget">
                <select id="marriageStatus" name="marriageStatus" class="combobox">
                    <option value="0">未知</option>
                    <option value="1">未婚</option>
                    <option value="2">已婚</option>
                </select>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2">证件类型</label>
            <div class="formControls col-3 ui-widget">
                <select id="idCardType" name="idCardType" class="combobox">
                    <option value="000018-0001">身份证</option>
                    <option value="000018-0002">军官证</option>
                    <option value="000018-0003">护照</option>
                </select>
            </div>
            <label class="form-label col-3">证件号</label>
            <div class="formControls col-3">
                <input type="text" class="input-text" value="" placeholder=""
                       id="idCardNo" name="idCardNo" >
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2">性别</label>
            <div class="formControls col-3 ui-widget">
                <select id="sex" name="sex" class="combobox">
                    <option value="000001-0002">男</option>
                    <option value="000001-0003">女</option>
                </select>
            </div>
            <label class="form-label col-3"><span class="c-red"></span>住址</label>
            <div class="formControls col-3">
                <input type="text" class="input-text" value="" placeholder=""
                       id="address" name="address">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2"><span class="c-red">*</span>密码</label>
            <div class="formControls col-3">
                <input type="password" class="input-text" value="" placeholder=""
                       id="userpassword" name="userpassword" datatype="*2-16">
            </div>

            <label class="form-label col-3"><span class="c-red">*</span>确认密码</label>
            <div class="formControls col-3">
                <input type="password" value="" name="userpassword1"
                       class="input-text" datatype="*" recheck="userpassword"
                       nullmsg="请再输入一次密码！" errormsg="您两次输入的账号密码不一致！"/>
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-2"><span class="c-red"></span>手机号</label>
            <div class="formControls col-3">
                <input type="text" class="input-text" value="" placeholder="" id="phone" name="phone" datatype="empty|m">
            </div>
            <label class="form-label col-3"><span class="c-red"></span>邮箱</label>
            <div class="formControls col-3">
                <input type="text" class="input-text" value="" placeholder=""
                       id="email" name="email" datatype="empty|e">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-2"><span class="c-red"></span>办公电话</label>
            <div class="formControls col-3">
                <input type="text" class="input-text" value="" placeholder=""
                       id="officePhone" name="officePhone">
            </div>
            <label class="form-label col-3"><span class="c-red"></span>职务</label>
            <div class="formControls col-3">
                <input type="text" class="input-text" value="" placeholder=""
                       id="professionalRanks" name="professionalRanks">
            </div>
        </div>

         <c:if test ="${isManagerPlat}">
	           <div class="row cl">
				<label class="form-label col-2"><span class="c-red"></span>机构名称</label>
				<div class="formControls col-3 ui-widget" id="org_id_div">
					<select id="orgId" class="combobox">
						<option value=" " selected="selected">内部管理员</option>
						<c:forEach var="org" items="${orgList}" varStatus="status">
							<option value="${org.id}">${org.name}</option>
						</c:forEach>
					</select>
				</div>
				<label class="form-label col-3"><span class="c-red">*</span>角色</label>
				<div class="formControls col-3 ui-widget">
					<select id="roleId" class="combobox" datatype="*1-64">
					</select>
				</div>
			   </div>
			</c:if>
			
			 <c:if test ="${not isManagerPlat}">
	           <div class="row cl" >
	           	<label class="form-label col-2" style="display:none"><span class="c-red"></span>机构名称</label>
				<div class="formControls col-3 ui-widget" id="org_id_div" style="display:none">
					<select id="orgId" class="combobox">
						<c:forEach var="org" items="${orgList}" varStatus="status">
							<option value="${org.id}">${org.name}</option>
						</c:forEach>
					</select>
				</div>
				<label class="form-label col-2"><span class="c-red">*</span>角色</label>
				<div class="formControls col-3 ui-widget">
					<select id="roleId" class="combobox" datatype="*1-64">
					</select>
				</div>
			   </div>
		</c:if>
        <div class="row cl">
            <div class="col-9 col-offset-2">
                <input class="btn btn-primary radius" type="submit"
                       value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</div>
<script type="text/javascript" src="<%=request.getContextPath()%>/lib/common/jquery.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/lib/layer1.8/layer.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/lib/common/H-ui.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/lib/common/H-ui.admin.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/lib/common/jquery-ui.min-1.10.2.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/lib/common/Validform_v5.3.2.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/employee/User_Add.js?1.6"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/lib/common/autocomplete.js?1"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/employee/user_Commen.js"></script>
<script type="text/javascript">
    var baseUrl="<%=request.getContextPath()%>";
    var isManagerPlat="<%=DscpCommUtils.isManagerPlat(request.getSession())%>";
</script>
</body>
</html>